import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import router from './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import pinia from '@/store/storeRegister.js'
import '@/assets/common.css'
import { ElMessage } from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import echartsResize from '@/directive/echartsResize.js'
import {menuListStore} from '@/store/menuList.js'

const app = createApp(App)

app.config.globalProperties.$Message = ElMessage
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.directive('echartsResize',echartsResize)
app.use(pinia)
const menuListStoreRef = menuListStore()
menuListStoreRef.setRouter()
app.use(router)
app.use(ElementPlus)
app.mount('#app')